package cn.winstone.enums;


/**
 * @author Winstone
 * @date 2020/7/29 - 8:51 上午
 */
public enum StatusCodeEnum {
    OK("ok",200),
    NOTFOUND("The requested page was not found", 404),
    MethodNotAllowed("Method Not Allowed", 405),
    ;

    private String msg;
    private int code;

    StatusCodeEnum(String msg, int code) {
        this.msg = msg;
        this.code = code;
    }

    @Override
    public String toString() {
        return "Status{" +
                "msg='" + msg + '\'' +
                ", code=" + code +
                '}';
    }

    public String getMsg() {
        return msg;
    }

    public int getCode() {
        return code;
    }
}
